<div class="module-setting module-setting-symbol">
	<ol class="breadcrumb fn-clearfix">
		<li>网站维护</li>
		<li>交易配置</li>
	</ol>

	<div class="ui-box">
		<div class="body-title">交易手续费及交易挂单控制
			<br>
			<br>
			<div class="alert alert-warning" role="alert">
				<p class="tip">挂单开关说明：</p>
				<p class="tip">开启：开通正常交易</p>
				<p class="tip">关闭：不允许进入页面，不允许挂单，不允许撤单，前台置灰展示（前台展示开关展示的情况下）</p>
				<p class="tip">下线：允许进入页面，不允许挂单，允许撤单，前台高亮展示（前台展示开关展示的情况下）</p>
			</div>
			<div class="alert alert-warning" role="alert">
				<p class="tip">前台展示开关说明：</p>
				<p class="tip">展示：前台展示该交易对，但是否能够挂单进行交易，取决于挂单开关的配置</p>
				<p class="tip">隐藏：前台隐藏该交易对</p>
			</div>
		</div>
		<table class="table table-striped table-hover">
			<thead>
				<tr>
					<th>名称</th>
					<th>币种排名</th>
					<th>交易币种
						<br>数量精度</th>
					<th>计价币种
						<br>价格精度</th>
					<th>计价币种
						<br>高亮位数</th>
					<th>交易手续费</th>
					<th>挂单开关</th>
					<th>前台展示开关</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in vm.list" ng-if="vm.isListLoading === false && vm.list.length > 0">
					<td>{{item.title}}</td>
					<td>
						<form class="form-inline">
							<div class="form-group">
								<label>{{item.rank}}</label>
							</div>
							<div class="form-group">
								<input type="number" class="form-control coin-input" style="width: 70px;" ng-model="item['rank_INPUT']">
								<a href="javascript:;" ng-click="vm.update(item.symbol, 'rank', item['rank_INPUT'])">更新</a>
							</div>
						</form>
					</td>
					<!-- 数量精度 -->
					<td>
						<form class="form-inline">
							<div class="form-group">
								<label>{{item[vm.config.AMOUNTPRECISION]}}</label>
							</div>
							<div class="form-group">
								<input type="number" class="form-control coin-input" style="width: 70px;" ng-model="item[vm.config.AMOUNTPRECISION + '_INPUT']">
								<a href="javascript:;" ng-click="vm.update(item.symbol, vm.config.AMOUNTPRECISION, item[vm.config.AMOUNTPRECISION + '_INPUT'])">更新</a>
							</div>
						</form>
					</td>
					<!-- 价格精度 -->
					<td>
						<form class="form-inline">
							<div class="form-group">
								<label>{{item[vm.config.PRICEPRECISION]}}</label>
							</div>
							<div class="form-group">
								<input type="number" class="form-control coin-input" style="width: 70px;" ng-model="item[vm.config.PRICEPRECISION + '_INPUT']">
								<a href="javascript:;" ng-click="vm.update(item.symbol, vm.config.PRICEPRECISION, item[vm.config.PRICEPRECISION + '_INPUT'])">更新</a>
							</div>
						</form>
					</td>
					<!--高亮位数-->
					<td>
						<form class="form-inline">
							<div class="form-group">
								<label>{{item[vm.config.HIGHLIGHTNO]}}</label>
							</div>
							<div class="form-group">
								<input type="number" class="form-control coin-input" style="width: 70px;" ng-model="item[vm.config.HIGHLIGHTNO + '_INPUT']">
								<a href="javascript:;" ng-click="vm.update(item.symbol, vm.config.HIGHLIGHTNO, item[vm.config.HIGHLIGHTNO + '_INPUT'])">更新</a>
							</div>
						</form>
					</td>
					<!--交易手续费-->
					<td>
						<form class="form-inline">
							<div class="form-group">
								<label>{{item[vm.config.ASSETFEERATE]}}%</label>
							</div>
							<div class="form-group">
								<input type="number" class="form-control coin-input" style="width: 70px;" ng-model="item[vm.config.ASSETFEERATE + '_INPUT']"> %
								<a href="javascript:;" ng-click="vm.updateTransactionFee(item.symbol, item[vm.config.ASSETFEERATE + '_INPUT'])" class="link">更新</a>
							</div>
						</form>
					</td>
					<!--交易开关-->
					<td>
						<form class="form-inline" role="form">
							<div class="form-group" style="width: 60px">
								<span ng-if="item.status === vm.STATUS_NOT_OPEN">未开启</span>
								<span ng-if="item.status === vm.STATUS_HAS_OPEN">已开启</span>
								<span ng-if="item.status === vm.STATUS_CLOSED">已下线</span>
							</div>
							<div class="form-group">
								<div class="status-box" ng-if="item.status === vm.STATUS_NOT_OPEN">
									<a href="javascript:;" ng-click="vm.updateStatus(item, vm.STATUS_HAS_OPEN, '开启')" class="btn btn-success">开启</a>
									<a href="javascript:;" disabled ng-click="vm.updateStatus(item, vm.STATUS_NOT_OPEN, '关闭')" class="btn btn-default">关闭</a>
									<a href="javascript:;" disabled ng-click="vm.updateStatus(item, vm.STATUS_CLOSED, '下线')" class="btn btn-default">下线</a>
								</div>
								<div class="status-box" ng-if="item.status === vm.STATUS_HAS_OPEN">
									<a href="javascript:;" disabled ng-click="vm.updateStatus(item, vm.STATUS_HAS_OPEN, '开启')" class="btn btn-success">开启</a>
									<a href="javascript:;" ng-click="vm.updateStatus(item, vm.STATUS_NOT_OPEN, '关闭')" class="btn btn-default">关闭</a>
									<a href="javascript:;" ng-click="vm.updateStatus(item, vm.STATUS_CLOSED, '下线')" class="btn btn-default">下线</a>
								</div>
								<div class="status-box" ng-if="item.status === vm.STATUS_CLOSED">
									<a href="javascript:;" disabled ng-click="vm.updateStatus(item, vm.STATUS_HAS_OPEN, '开启')" class="btn btn-success">开启</a>
									<a href="javascript:;" ng-click="vm.updateStatus(item, vm.STATUS_NOT_OPEN, '关闭')" disabled class="btn btn-default">关闭</a>
									<a href="javascript:;" ng-click="vm.updateStatus(item, vm.STATUS_HAS_OPEN, '上线')" class="btn btn-warning">上线</a>
								</div>
							</div>
						</form>
					</td>
					<td>
						<form class="form-inline" role="form">
							<div class="form-group" style="width: 60px">
								<span ng-if="item.SHOWSTATUS === 'ON'">已展示</span>
								<span ng-if="item.SHOWSTATUS !== 'ON'">已隐藏</span>
							</div>
							<div class="form-group">
								<div class="status-box" ng-if="item.SHOWSTATUS === 'ON'">
									<a href="javascript:;" disabled ng-click="vm.updateShow(item.symbol, vm.config.SHOWSTATUS, 'ON')" class="btn btn-success">展示</a>
									<a href="javascript:;" ng-click="vm.updateShow(item.symbol, vm.config.SHOWSTATUS, 'OFF')" class="btn btn-default">隐藏</a>
								</div>
								<div class="status-box" ng-if="item.SHOWSTATUS !== 'ON'">
									<a href="javascript:;" ng-click="vm.updateShow(item.symbol, vm.config.SHOWSTATUS, 'ON')" class="btn btn-success">展示</a>
									<a href="javascript:;" disabled ng-click="vm.updateShow(item.symbol, vm.config.SHOWSTATUS, 'OFF')" class="btn btn-default">隐藏</a>
								</div>
							</div>
						</form>
					</td>
				</tr>
				<tr class="ui-no-data" ng-if="vm.isListLoading === false && (vm.list.length === 0||vm.list===null)">
					<td colspan="8">暂无数据</td>
				</tr>
				<tr class="ui-loading" ng-if="vm.isListLoading === true">
					<td colspan="8">正在加载，请稍候...</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>